// #include "sharedresources.hpp"
#include "log.hpp"

int main()
{
    //向管道中写入
    int fd=open(FIFO_FILE,O_WRONLY);
    if(fd < 0)
    {
        perror("open fifo fail");
        return errno;
    }

    while(1)
    {
        cout<<"send say :";
        string s;
        getline(cin,s);
        write(fd,s.c_str(),s.size());
        if(s=="bye")
        {
            break;
        }
    }

    close(fd);

    return 0;
}